package com.example.zhanghf.servicetest;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.util.Log;
import android.widget.Toast;

/**
 * Created by zhanghf on 2015/5/28.
 */
public class ServiceDemo extends Service{
    @Override
    public void onDestroy() {
        Log.i("ServiceDemo", "onDestroy");
        Toast.makeText(ServiceDemo.this,"onDestroy()",Toast.LENGTH_SHORT).show();
        super.onDestroy();
    }

    @Override
    public void onCreate() {
        Log.i("ServiceDemo","onCreate");
        Toast.makeText(ServiceDemo.this,"onCreate()",Toast.LENGTH_SHORT).show();
        super.onCreate();
    }

    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        Log.i("ServiceDemo","onStartCommand");
        Toast.makeText(ServiceDemo.this,"onStartCommand()",Toast.LENGTH_SHORT).show();
        return super.onStartCommand(intent, flags, startId);
    }

    @Override
    public IBinder onBind(Intent intent) {
        return null;
    }
}
